package com.kkb.service.jbinfoservice.jbinfoserviceiml;

import com.kkb.bean.JbShopinfo;
import com.kkb.bean.JbTags;
import com.kkb.dao.JbShopinfoMapper;
import com.kkb.dao.JbTagsMapper;
import com.kkb.dao.ShopinfoTagsMapper;
import com.kkb.service.jbinfoservice.JbInfoService;
import com.kkb.vo.jbInfor.req.JbInfoReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class JbInfoServiceIml implements JbInfoService {
    @Autowired
    private JbShopinfoMapper jbShopinfoMapper;
    @Autowired
    private JbTagsMapper jbTagsMapper;
    @Override
    //查询店铺信息
    public JbShopinfo selectById(Integer id) {
       JbShopinfo jbShopinfo =jbShopinfoMapper.selectById(id);
       return jbShopinfo;
    }
      //通过自定义更新方法更新店铺信息
    public void updateById(JbInfoReq jbInfoReq){
//        JbShopinfo jbShopinfo=new JbShopinfo();
//        jbShopinfo.setsId(jbInfoReq.getsId());
//        jbShopinfo.setsName(jbInfoReq.getsName());
//        jbShopinfo.setsJianjie(jbInfoReq.getsJianjie());
//        System.out.println(jbInfoReq.getsLogo());
//        jbShopinfo.setsLogo(jbInfoReq.getsLogo());
//        jbShopinfo.setsToutu(jbInfoReq.getsToutu());
//        jbShopinfo.setsUrl(jbInfoReq.getsUrl());
          jbShopinfoMapper.updateById(jbInfoReq);

    }
       public List<JbTags> selectTags(){
          List<JbTags> list =jbTagsMapper.selectAll();
          return list;
       }

}
